package com.pingan.haofang.searchcloud.web.monitor.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 索引预警配置Form
 *
 * @author EX-ZHOUYONG005
 * @date 2018/10/19
 * @since 1.0.0
 */
@ApiModel(description = "索引预警配置Form")
public class IndexWarningConfigForm {

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id", required = true)
    @NotNull
    private Long projectId;

    /**
     * 索引ids字符串，全部：-1，多选：以,分隔字符串
     */
    @ApiModelProperty(value = "索引ids字符串，全部：-1，多选：以,分隔字符串", required = true)
    @NotNull
    private String indexIds;

    /**
     * 单条索引平均耗时(ms)
     */
    @ApiModelProperty(value = "单条索引平均耗时(ms)")
    @Min(value = 1)
    private int recordCost;

    /**
     * 索引耗时(h)
     */
    @ApiModelProperty(value = "索引耗时(h),可为小数")
    private double indexCost;


    /**
     * 成功率(%)
     */
    @ApiModelProperty(value = "成功率(%)")
    @Range(min = 0, max = 100)
    private int successRate;

    /**
     * 预警接收人
     */
    @ApiModelProperty(value = "预警接收人")
    @NotBlank
    private String mailTo;

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getIndexIds() {
        return indexIds;
    }

    public void setIndexIds(String indexIds) {
        this.indexIds = indexIds;
    }

    public int getRecordCost() {
        return recordCost;
    }

    public void setRecordCost(int recordCost) {
        this.recordCost = recordCost;
    }

    public double getIndexCost() {
        return indexCost;
    }

    public void setIndexCost(double indexCost) {
        this.indexCost = indexCost;
    }

    public int getSuccessRate() {
        return successRate;
    }

    public void setSuccessRate(int successRate) {
        this.successRate = successRate;
    }

    public String getMailTo() {
        return mailTo;
    }

    public void setMailTo(String mailTo) {
        this.mailTo = mailTo;
    }
}
